<?php
header('Content-type:text/html; charset=UTF-8');
include_once('ips.php');
// server
$ip = urldecode($_GET['l_ip']);
//$iplist = array('58.64.186.148','58.64.186.147','58.64.190.8','114.80.208.83','112.65.242.89','114.80.208.84','114.80.208.189','112.65.242.86',"192.168.0.64","114.80.154.71","112.65.242.190",'112.65.248.212','114.80.154.73',"192.168.0.63",'112.65.242.83','114.80.208.143');

$result = '';
if (empty($ip) || !isset($ip)) {
	$result = '10001';
} elseif (!preg_match("/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/", $ip)) {
	$result = '10001';
} else {
	$result = in_array($ip, $ips) ? '10000' : '10001';
}
echo $result;
?>